package cs.upt.awp.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import cs.upt.awp.dao.TravelImagesDAO;
import cs.upt.awp.data.TravelImage;
import cs.upt.awp.model.TravelImageGalleryModel;

public class TravelImagesServices implements DataServices<TravelImage> {
	
	@Autowired
	TravelImagesDAO imagesDao;

	@Override
	public boolean addEntity(TravelImage img) throws Exception {
		return imagesDao.addEntity(img);
	}

	@Override
	public TravelImage getEntityById(long id) throws Exception {
		return imagesDao.getEntityById(id);
	}

	@Override
	public List<TravelImage> getEntityList() throws Exception {
		return imagesDao.getEntityList();
	}

	@Override
	public boolean deleteEntity(long id) throws Exception {
		return imagesDao.deleteEntity(id);
	}
	
	public List<TravelImageGalleryModel> getImagesForRecord(long recordId){
		return imagesDao.getImagesForRecord(recordId);
	}
}
